from boto3.session import Session
from config import FORMAL_S3_CONFIG, region_name


session = Session(FORMAL_S3_CONFIG['access_key'], FORMAL_S3_CONFIG['secret_key'], region_name=FORMAL_S3_CONFIG['region_name'])
client = session.client('stepfunctions')


def send_task_success(taskToken, output):
    response = client.send_task_success(
        taskToken=taskToken,
        output=output
    )
    return response

def send_task_failure(cause, error, taskToken):
    response = client.send_task_failure(
        taskToken=taskToken,
        error=error,
        cause=cause
    )
    return response